﻿ai_strategy_maintain_power_balance = {
	icon = "gfx/interface/icons/ai_strategy_icons/maintain_power_balance.dds"
	
	type = diplomatic
	
	wanted_army_ratio = {
		value = 200000
	}
	
	wanted_navy_ratio = {
		value = 400000
	}
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 1.5
	}
	
	wargoal_maneuvers_fraction = {
		value = -0.1
	}	
	
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = -25
	}

	recklessness = {
		value = -0.25
	}

	aggression = {
		value = 0.25	

		if = {
			limit = { 
				NOT = { is_country_type = unrecognized }
				scope:target_country = { is_country_type = unrecognized } 
			}
			add = 0.25
			
			if = {
				limit = { has_technology_researched = civilizing_mission }
				add = 0.5
			}			
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.1
		}			

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}		
	}
	 
	building_group_weights = {
		bg_technology = 1.25
	}
	
	secret_goal_weights = {
		protect = 1.5
		dominate = 1.5
		reconcile = 1.5
	}
	
	wargoal_weights = {
		regime_change = 3.0
		humiliation = 2.0
		liberate_subject = 1.5
		liberate_country = 1.5
	}

	possible = {
		always = yes
	}
	
	weight = {
		value = 10
		
		if = {
			limit = { country_rank < rank_value:major_power }
			add = 10
		}	
		
		if = {
			limit = { is_country_type = unrecognized }
			multiply = 0.5
		}	
	}
}

ai_strategy_territorial_expansion = {
	icon = "gfx/interface/icons/ai_strategy_icons/territorial_expansion.dds"
	
	type = diplomatic
	
	wanted_army_ratio = {
		value = 150000
	}
	
	wanted_navy_ratio = {
		value = 400000
	}
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = {
		value = 0.75
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.15
	}		
	
	diplomatic_play_neutrality = {
		value = 25
	}	

	diplomatic_play_boldness = {
		value = 25
	}
	
	recklessness = {
		value = 0.5
	}

	aggression = {
		value = 1
		
		if = {
			limit = { 
				NOT = { is_country_type = unrecognized }
				scope:target_country = { is_country_type = unrecognized } 
			}
			add = 1
		}	

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
					}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
					}
				}
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}
		}			
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	wargoal_scores = {
		take_treaty_port = {
			value = 0

			if = {
				limit = {
					has_claim = scope:target_state
					scope:target_country = { has_treaty_port_in_country = root }
				}
				add = 25
			}			

			min = 0
			max = 100			
		}
	}
	
	secret_goal_weights = {
		protect = 0.5
		conquer = 1.5
	}

	wargoal_weights = {
		conquer_state = 1.5
		return_state = 1.5
	}	
		
	possible = {
		always = yes
	}

	weight = {
		value = 10
		
		if = {
			limit = { 
				any_state = {
					has_claim_by = root
				} 
			}
			add = 10
		}
    
		if = {
			limit = { ig:ig_armed_forces = { is_powerful = yes } }
			multiply = 1.5
		}			
		
		if = {
			limit = { country_is_in_europe = yes }
			multiply = 0.75
		}
	}
}

ai_strategy_armed_isolationism = {
	icon = "gfx/interface/icons/ai_strategy_icons/armed_isolationism.dds"
	
	type = diplomatic
	
	wanted_army_ratio = {
		value = 150000
	}
	
	wanted_navy_ratio = {
		value = 500000
	}
	
	undesirable_infamy_level = {
		value = 1
	}
	
	unacceptable_infamy_level = {
		value = 25
	}
	
	ideological_opinion_effect_mult = {
		value = 0.75
	}
	
	wargoal_maneuvers_fraction = {
		value = -0.1
	}		
	
	diplomatic_play_neutrality = {
		value = 50
	}	

	diplomatic_play_boldness = {
		value = 0
	}
	
	recklessness = {
		value = -0.5
	}

	aggression = {
		value = 0
	}
	
	building_group_weights = {
		bg_army = 1.5
	}
	
	secret_goal_weights = {
		conquer = 0.0
		dominate = 0.0
		protect = 0.0
	}

	wargoal_weights = {
		conquer_state = 0.0
		make_puppet = 0.0
		make_dominion = 0.0
		make_vassal = 0.0
	}	
	
	possible = {
		NOT = { country_rank = rank_value:great_power }
	}
	
	weight = {
		value = 10
		
		if = {
			limit = { has_law = law_type:law_national_militia }
			add = 20
		}

		if = {
			limit = { has_law = law_type:law_isolationism }
			add = 20
		}	

		if = {
			limit = { country_rank = rank_value:great_power }
			multiply = 0.1
		}			
		
		if = {
			limit = { country_rank = rank_value:major_power }
			multiply = 0.5
		}			
	}
}

ai_strategy_unify_germany = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	wanted_army_ratio = {
		value = 150000
	}
	
	wanted_navy_ratio = {
		value = 400000
	}
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = {
		value = 0.5
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.1
	}		
	
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 50
	}

	obligation_value = {
		value = 0
	
		if = {
			limit = { 
				scope:target_country = {			
					OR = {
						country_has_primary_culture = cu:north_german
						country_has_primary_culture = cu:south_german
					}
				}
			}
			add = 25
		}
	}	

	recklessness = {
		value = 0.5
	}

	aggression = {
		value = 0.25
		
		if = {
			limit = { 
				scope:target_country = {			
					OR = {
						country_has_primary_culture = cu:north_german
						country_has_primary_culture = cu:south_german
					}
				}
			}
			add = 10
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}		
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	wargoal_scores = {
		conquer_state = {
			if = {
				limit = {
					scope:target_state = {
						state_region = {
							OR = {
								is_homeland = cu:north_german
								is_homeland = cu:south_german
							}
						}
					}
					can_reach_target_state = yes				
				}
				add = 100
			}
      
			if = {
				limit = {
					scope:target_country = c:AUS
				}
				subtract = 150
			}
      
		}
		return_state = {
			if = {
				limit = {
					scope:target_state = {
						state_region = {
							OR = {
								is_homeland = cu:north_german
								is_homeland = cu:south_german
							}
						}	
					}
					can_reach_target_state = yes
				}
				add = 100
			}
		}
		unification_leadership = {
			if = {
				limit = {
					has_journal_entry = je_german_unification
				}
				add = 100
			}	
		}	
	}
	
	secret_goal_scores = {
    befriend = {
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_german
							country_has_primary_culture = cu:south_german
						}					
						NOT = { is_unification_candidate = GER }					
					}
				}
				add = 1000
			}
		}
		protect = {		
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_german
							country_has_primary_culture = cu:south_german
						}
						NOT = { is_unification_candidate = GER }
						is_supporting_unification_candidate = { who = root country_formation = GER }
					}
				}
				add = 1000
			}		
		}		
		dominate = {		
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_german
							country_has_primary_culture = cu:south_german
						}					
						NOT = { is_unification_candidate = GER }
						NOT = { is_supporting_unification_candidate = { who = root country_formation = GER } }
					}
				}
				add = 500
			}		
		}		
		conquer = {				
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_german
							country_has_primary_culture = cu:south_german
						}
						OR = {
							is_unification_candidate = GER
							NOT = { is_supporting_unification_candidate = { who = root country_formation = GER } }
						}
					}
				}
				add = 1000
			}			
		}	
		antagonize = {				
			if = {
				limit = {
					scope:target_country = {
						is_unification_candidate = GER
					}
				}
				add = 1000
			}			
		}		
	}	

	wargoal_weights = {
		conquer_state = 2.0
		return_state = 2.0
		unification_leadership = 3.0
	}	
		
	possible = {
		OR = {
			AND = {
				country_rank >= rank_value:major_power
				has_technology_researched = pan-nationalism
				OR = {
					country_has_primary_culture = cu:north_german
					country_has_primary_culture = cu:south_german
				}
			}
			is_unification_candidate = GER	
		}
		NOT = { country_tier = empire }
	}

	weight = {
		value = 1000
	}
}

ai_strategy_unify_ethiopia = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	wanted_army_ratio = {
		value = 150000
	}
	
	wanted_navy_ratio = {
		value = 400000
	}
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = 0.5
	
	wargoal_maneuvers_fraction = {
		value = 0.1
	}		
		
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 50
	}

	obligation_value = {
		value = 0
	
		if = {
			limit = { 
				scope:target_country = { can_form_nation = ETH }
			}
			add = 25
		}
	}			
		
	recklessness = {
		value = 0.5
	}	

	aggression = {
		value = 0.5
		
		if = {
			limit = { 
				scope:target_country = { can_form_nation = ETH }
			}
			add = 2.5
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}	
		
		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}			
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	wargoal_scores = {
		annex_country = {
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = ETH
					}
					can_reach_target_country = yes
				}
				add = 300
			}		
		}
		conquer_state = {
			if = {
				limit = {
					scope:target_state = {
						state_region = {
							OR = {
								is_homeland = cu:amhara
								is_homeland = cu:oromo
								is_homeland = cu:tigray
							}					
						}						
					}
					can_reach_target_state = yes
				}
				add = 100
			}
		}
		return_state = {
			if = {
				limit = {
					scope:target_state = {
						state_region = {
							OR = {
								is_homeland = cu:amhara
								is_homeland = cu:oromo
								is_homeland = cu:tigray
							}					
						}
					}
					can_reach_target_state = yes
				}
				add = 200
			}
		}		
	}
	
	secret_goal_scores = {
		befriend = {		
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = ETH
					}
				}
				add = 150
				
				if = {
					limit = {
						can_reach_target_country = no
					}	
					add = 150
				}	
			}
		}		
		conquer = {				
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = ETH
					}
					can_reach_target_country = yes
				}
				add = 500
			}				
		}			
	}	

	possible = {
		NOT = { exists = c:ETH }
		can_form_nation = ETH
	}

	weight = {
		value = 500
		
		if = {
			limit = { NOT = { is_country_type = unrecognized } }
			add = 100
		}		
		
		if = {
			limit = { country_rank = rank_value:unrecognized_regional_power }
			add = 25
		}

		if = {
			limit = { country_rank = rank_value:unrecognized_major_power }
			add = 50
		}		
	}
}